package com.spx.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.spx.usercenter.model.domain.Team;
import com.spx.usercenter.model.domain.User;
import com.spx.usercenter.model.dto.TeamQuery;
import com.spx.usercenter.model.request.TeamJoinRequest;
import com.spx.usercenter.model.request.TeamQuitRequest;
import com.spx.usercenter.model.request.TeamUpdateRequest;
import com.spx.usercenter.model.vo.TeamUserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author s
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2024-03-15 18:40:04
*/
public interface TeamService extends IService<Team> {

    Long addTeam(Team team, User loginUser);

    List<TeamUserVO> listTeam(TeamQuery teamQuery, boolean isAdmin);

    Boolean updateTeam(TeamUpdateRequest teamUpdateRequest,User loginUser);

    Boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    /**
     * 退出队伍
     * @param teamQuitRequest
     * @param loginUser
     * @return
     */
    Boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    /**
     * 解散队伍
     * @param id
     * @param loginUser
     * @return
     */
    Boolean deleteTeam(long id, User loginUser);
}
